package com.jiang.executor.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jiang.common.ResultTO;

@Controller
public class TestController {

	private static Logger logger = LoggerFactory.getLogger(TestController.class);

	@RequestMapping("/msg")
	@ResponseBody
	public ResultTO<String> msg(int a) {
		logger.info("执行器执行了，参数：a="+ a);
		for (int i = 0; i < 10; i++) {
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			logger.info("执行器执行了..." + i);
		}
		return ResultTO.success("任务执行完成");
	}

}
